FHIR © HL7.org  |  Server Home  |  FHIR Server FHIR Server 3.4.11  |  FHIR Version n/a  User: [n/a]

Resource StructureDefinition/FHIR Server from package uk.nhsdigital.r4.test#2.10.1-prerelease (156 ms)

Package uk.nhsdigital.r4.test
Type StructureDefinition
Id Id
FHIR Version R4
Source https://simplifier.net/resolve?scope=uk.nhsdigital.r4.test@2.10.1-prerelease&canonical=https://fhir.nhs.uk/StructureDefinition/NHSDigital-MessageHeader
Url https://fhir.nhs.uk/StructureDefinition/NHSDigital-MessageHeader
Status draft
Name NHSDigitalMessageHeader
Experimental False
Type MessageHeader
Kind resource

Resources that use this resource

StructureDefinition
https://fhir.nhs.uk/StructureDefinition/NHSDigital-Bundle-FHIRMessage NHSDigitalBundleFHIRMessage

Resources that this resource uses

StructureDefinition
https://fhir.nhs.uk/StructureDefinition/Extension-MessageHeader-LocalPart ExtensionMessageHeaderLocalPart
https://fhir.nhs.uk/StructureDefinition/Extension-replacementOf ExtensionreplacementOf
https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization NHSDigitalOrganization
https://fhir.nhs.uk/StructureDefinition/NHSDigital-Practitioner NHSDigitalPractitioner
https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole NHSDigitalPractitionerRole
https://fhir.nhs.uk/ValueSet/NHSDigital-message-events NHSMessageEvents
https://fhir.nhs.uk/ValueSet/message-reason-code MessageReasonCodes


Source

{
  "resourceType" : "StructureDefinition",
  "id" : "35cdca0d-46a3-4dd3-9967-9470b864b92e",
  "url" : "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MessageHeader",
  "name" : "NHSDigitalMessageHeader",
  "status" : "draft",
  "fhirVersion" : "4.0.1",
  "kind" : "resource",
  "abstract" : false,
  "type" : "MessageHeader",
  "baseDefinition" : "https://fhir.hl7.org.uk/StructureDefinition/UKCore-MessageHeader",
  "derivation" : "constraint",
  "differential" : {
    "element" : [
      {
        "id" : "MessageHeader",
        "path" : "MessageHeader",
        "definition" : "The header for a FHIR Message exchange that is either requesting or responding to an action. The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle.\r\n\r\nMessaging middleware systems are expected to use this `MessageHeader` resource to route, deliver and handle messages correctly. \r\n\r\nThis profile is not tied to any specific transport/API requirement or clinical requirement. Intermediaries are not expected to perform detailed routing on clinical content.\r\nSome clinical information will be required for routing purposes and this will be held within `eventCoding` and `reason` sections as discussed in the Message Event section below. \r\nIn circumstances where more detailed information is required for routing this **MUST** be carried in the relevant FHIR Resource in the payload only. For example, document types should be recorded in FHIR `DocumentReference.type` and health service/specialty type can be recorded in FHIR `Encounter.serviceType` or ` DocumentReference.context.practiceSetting`.\r\n\r\n\r\nSystems involved in NHSDigital/UKCore messaging are expected to support this profile only, extensions or derived profiles are permitted but they may only have limited (internal) scope and will not be supported outside of this scope (e.g. externally). \r\nThis resource **SHOULD NOT** be profiled to further define the contents of the resources and [FHIR MessageDefinition](https://www.hl7.org/fhir/messagedefinition.html) **MUST** be used instead.",
        "comment" : "<a name=\"identifiers\"></a>\r\n### identifiers and message timings<a href=\"#identifiers\" title=\"link to here\" class=\"self-link\"><i class=\"bi-link\"></i></a>\r\n\r\nFHIR messages have two identifiers: the messageIdentifier of the Message (`Bundle.identifier`) and a messageId (`Bundle.id`) which is used in each transport channel . The messageId should be unique within a each message channel/stream. Whenever a message is resent, the messageIdentifier of the Bundle remains the same, but the messageId may change. The response message has its own unique messageIdentifier, the messageIdentifier of the request message can be referenced in the MessageHeader.response.identifier element.\r\n\r\nThe `Bundle.identifier`, the messageIdentifier, **MUST** have a UUID value.\r\n\r\nSystems may chose to map *X-Request-ID* header to the `Bundle.id`, messageId. If both are supplied to a `$process-messge` endpoint it is recommended they hold the same values.\r\n\r\nMessageHeader can hold previous and extra messageId's in the {{link:https://fhir.nhs.uk/StructureDefinition/Extension-MessageHeader-messageId}}\r\n\r\n#### Local Part/Addressing (sender and/or destination.receiver)\r\n\r\nWhen exchanging messages between organisations, local references **SHOULD NOT** be used for `sender` and `destination.receiver` references. Local references can make use of the Extension {{link:https://fhir.nhs.uk/StructureDefinition/Extension-MessageHeader-LocalPart}}. Messages between Organisations should be directed to the Organisation. The receiving organisation will take responsibility for delivering to the local address. Sending organisations are not expected to be able to deliver to local entities in another organisation/domain/facility. \r\n\r\nThis concept is similar to email addresses `local-part@domain` and also HL7 version 2 combination of `Sending/Receiving Application | Sennding/Receiving Facility` in the MSH segment.\r\n\r\nIn the example below, the destination is a clinic (A99968) which part of NHS Trust (RBA). Note also the destination endpoint is for the NHS Trust, who will route the message as required. \r\n\r\n```json\r\n\"destination\": [\r\n {\r\n \"endpoint\": \"urn:nhs-uk:addressing:ods:RBA\",\r\n \"receiver\": {\r\n \"extension\": [\r\n {\r\n \"url\": \"https://fhir.nhs.uk/StructureDefinition/Extension-MessageHeader-LocalPart\",\r\n \"valueReference\": {\r\n \"identifier\": {\r\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\r\n \"value\": \"A99968\"\r\n }\r\n }\r\n\r\n }\r\n ],\r\n \"identifier\": {\r\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\r\n \"value\": \"RBA\"\r\n },\r\n \"display\": \"TAUNTON AND SOMERSET NHS FOUNDATION TRUST\"\r\n }\r\n }\r\n],\r\n```\r\n\r\n\r\n\r\n#### example - Prescription, Pharmacy known\r\n\r\n{{render:nominatedPharmacy}}\r\n\r\nIn the example below, the prescriber Taunton and Somerset Foundation Trust (RBA), is sending a message to The Simple Pharmacy (VNE51). The `destination.receiver` and `sender` are references to these organisations.\r\n\r\nThis message is to be sent via the Electronic Prescription Service, the http address of EPS is held in `destination.endpoint`. Replies to this message can only be received by MESH and the `source.endpoint` is the MESH address of the sending organisation.\r\n\r\n```json\r\n\"destination\": [\r\n {\r\n \"endpoint\": \"https://sandbox.api.service.nhs.uk/electronic-prescriptions/$post-message\",\r\n \"receiver\": {\r\n \"identifier\": {\r\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\r\n \"value\": \"VNE51\"\r\n },\r\n \"display\": \"The Simple Pharmacy\"\r\n }\r\n }\r\n],\r\n\"sender\": {\r\n \"identifier\": {\r\n \"extension\": [\r\n {\r\n \"url\": \"https://fhir.nhs.uk/StructureDefinition/Extension-MessageHeader-LocalPart\",\r\n \"valueReference\": {\r\n \"identifier\": {\r\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\r\n \"value\": \"A99968\"\r\n }\r\n }\r\n }\r\n ],\r\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\r\n \"value\": \"RBA\"\r\n },\r\n \"display\": \"TAUNTON AND SOMERSET NHS FOUNDATION TRUST\"\r\n},\r\n\"source\": {\r\n \"endpoint\": \"urn:nhs-uk:addressing:ods:RBA\"\r\n}\r\n```\r\n\r\nEPS will now send this message to the pharmacy. This message is collected by the pharmacy using MESH and so the `destination.endpoint` is now the MESH address of the pharmacy. Replies to this message are sent to EPS and so the `source.endpoint` is now the http address of the EPS **$process-message** endpoint.\r\n\r\n```json\r\n\"destination\": [\r\n {\r\n \"endpoint\": \"urn:nhs-uk:addressing:ods:VNE51\",\r\n \"receiver\": {\r\n \"identifier\": {\r\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\r\n \"value\": \"VNE51\"\r\n },\r\n \"display\": \"The Simple Pharmacy\"\r\n }\r\n }\r\n],\r\n\"sender\": {\r\n \"extension\": [\r\n {\r\n \"url\": \"https://fhir.nhs.uk/StructureDefinition/Extension-MessageHeader-LocalPart\",\r\n \"valueReference\": {\r\n \"identifier\": {\r\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\r\n \"value\": \"A99968\"\r\n }\r\n }\r\n\r\n }\r\n ],\r\n \"identifier\": {\r\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\r\n \"value\": \"RBA\"\r\n },\r\n \"display\": \"TAUNTON AND SOMERSET NHS FOUNDATION TRUST\"\r\n},\r\n\"source\": {\r\n \"endpoint\": \"https://sandbox.api.service.nhs.uk/electronic-prescriptions/$post-message\"\r\n}\r\n```\r\n\r\n#### example - Prescription, Pharmacy not known\r\n\r\n{{render:noNominatedPharmacy}}\r\n\r\nIn this example the destination is not known and the message is sent to NHS Digital (X26). \r\n\r\n```json\r\n\"destination\": [\r\n {\r\n \"endpoint\": \"https://sandbox.api.service.nhs.uk/electronic-prescriptions/$post-message\",\r\n \"receiver\": {\r\n \r\n{{render:messageIDs}}\r\n\r\n\r\n\r\nIn addition, a FHIR Message Bundle has two important timestamps:\r\n\r\nThe time of sending the message is captured in the timestamp element\r\nThe last time the message was updated (e.g. by storing or modification) is captured in the meta.lastUpdated element.\r\n\r\n```json\r\n{\r\n \"resourceType\": \"Bundle\",\r\n \"id\": \"884cfa4f-7a56-4be5-9592-783ef4f3992a\",\r\n \"meta\": {\r\n \"lastUpdated\": \"2020-11-02T01:43:30+00:00\"\r\n },\r\n \"identifier\": {\r\n \"system\": \"https://tools.ietf.org/html/rfc4122\",\r\n \"value\": \"ad945a29-85f8-439a-b590-6789719adc16\"\r\n },\r\n \"type\": \"message\",\r\n \"timestamp\": \"2020-11-02T01:43:30+00:00\",\r\n \"entry\": [\r\n {\r\n \"fullUrl\": \"urn:uuid:311316d3-1de0-4f7c-8109-c950ead1c717\",\r\n \"resource\": {\r\n \"resourceType\": \"MessageHeader\",\r\n \"extension\": [\r\n {\r\n \"url\": \"https://fhir.nhs.uk/StructureDefinition/Extension-Spine-MessageHeader-messageId\",\r\n \"valueIdentifier\": {\r\n \"system\": \"https://fhir.nhs.uk/Id/prescription-order-number\",\r\n \"value\": \"DC2C66-A1B2C3-23407B\"\r\n }\r\n }\r\n ]\r\n```\r\n\r\n\r\n### From (source and sender) and To (destination)\r\n\r\n\r\nThe *From* is contained in both the `sender` and `source` elements and the *To* is contained in the `destination` array. One source, sender and at least one destination **MUST** be present. \r\n\r\nMessages may be sent over multiple transmission legs (i.e. the first leg uses http and the second MESH). The contents of elements **SHOULD** reflect the current leg only.\r\n\r\n- destination.endpoint\r\n- source.endpoint\r\n- MessageHeader.extension(messageId)\r\n\r\n Endpoints **MUST** point to valid endpoint uri's on each leg of the messages journey, they may not refer to inaccessible endpoints on other legs. See also the destination section below.",
        "constraint" : [
          {
            "key" : "nhsd-11",
            "severity" : "warning",
            "human" : "replacementOf extension is required for update messages",
            "expression" : "event.code.where(substring($this.length()-6) = 'update').exists().not() or (event.code.where(substring($this.length()-6) = 'update').exists() and extension('https://fhir.nhs.uk/StructureDefinition/Extension-replacementOf').exists())"
          }
        ]
      },
      {
        "id" : "MessageHeader.extension",
        "path" : "MessageHeader.extension",
        "slicing" : {
          "discriminator" : [
            {
              "type" : "value",
              "path" : "url"
            }
          ],
          "rules" : "open"
        },
        "min" : 0
      },
      {
        "id" : "MessageHeader.extension:replacementOf",
        "path" : "MessageHeader.extension",
        "sliceName" : "replacementOf",
        "definition" : "If the message is an update or replaceOf a previous message, then this extension should reference the replaced FHIR Message (Bundle.identifier).\r\n\r\n```json\r\n\"extension\": [\r\n {\r\n \"url\": \"https://fhir.nhs.uk/StructureDefinition/Extension-replacementOf\",\r\n \"valueIdentifier\": {\r\n \"system\": \"https://tools.ietf.org/html/rfc4122\",\r\n \"value\": \"334a3195-1f6c-497a-8efe-d272ca9c4e38\"\r\n }\r\n }\r\n],\r\n```",
        "min" : 0,
        "max" : "1",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "https://fhir.nhs.uk/StructureDefinition/Extension-replacementOf"
            ]
          }
        ],
        "mustSupport" : true
      },
      {
        "id" : "MessageHeader.event[x]",
        "path" : "MessageHeader.event[x]",
        "definition" : "The main message type is held in the mandatory `eventCoding` section which can be subdivided by the optional `reason` codes.\r\n\r\nEvery code **MUST** have a corresponding `MessageDefinition`.\r\n\r\nFor example the event code `dispense-notification` has a MessageDefintion of [https://fhir.nhs.uk/MessageDefinition/pharmacy-dispense](https://simplifier.net/guide/DigitalMedicines/dispense-notification). This definition lists the profiles and cardinality of the resources in the message. `eventCoding` and MessageDefintion define the structure of the message. \r\n\r\n```json\r\n\"eventCoding\": {\r\n \"system\": \"https://fhir.nhs.uk/CodeSystem/message-event\",\r\n \"code\": \"dispense-notification\",\r\n \"display\": \"Dispense Notification\"\r\n}\r\n```",
        "type" : [
          {
            "code" : "Coding"
          }
        ],
        "mustSupport" : true,
        "binding" : {
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString" : "MessageEvent"
            },
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-isCommonBinding",
              "valueBoolean" : true
            }
          ],
          "strength" : "required",
          "valueSet" : "https://fhir.nhs.uk/ValueSet/NHSDigital-message-events"
        }
      },
      {
        "id" : "MessageHeader.event[x].system",
        "path" : "MessageHeader.event[x].system",
        "min" : 1
      },
      {
        "id" : "MessageHeader.event[x].code",
        "path" : "MessageHeader.event[x].code",
        "min" : 1
      },
      {
        "id" : "MessageHeader.destination",
        "path" : "MessageHeader.destination",
        "definition" : "Lists all the destinations where message is be delivered to. \r\n\r\nThe recipient of a message takes the responsibility of delivering to all the `destination.endpoint`s. Similarly the sender **MUST NOT** include destination's the recipient can not deliver to, these destinations **MUST** be removed from the message. Additional rules for endpoint can be found in the source section below.",
        "requirements" : "Indicates where message is to be sent for routing purposes. Allows verification of \"am I the intended recipient\".\r\n\r\n```json\r\n\"destination\": [\r\n {\r\n \"endpoint\": \"urn:nhs-uk:addressing:mesh:Y90638OT002\",\r\n \"receiver\": {\r\n \"identifier\": {\r\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\r\n \"value\": \"Y9063\"\r\n }\r\n }\r\n }\r\n ]\r\n```",
        "mustSupport" : true
      },
      {
        "id" : "MessageHeader.destination.receiver",
        "path" : "MessageHeader.destination.receiver",
        "min" : 1,
        "type" : [
          {
            "code" : "Reference",
            "targetProfile" : [
              "https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole",
              "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Practitioner",
              "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization"
            ]
          }
        ]
      },
      {
        "id" : "MessageHeader.destination.receiver.extension",
        "path" : "MessageHeader.destination.receiver.extension",
        "slicing" : {
          "discriminator" : [
            {
              "type" : "value",
              "path" : "url"
            }
          ],
          "rules" : "open"
        },
        "min" : 0
      },
      {
        "id" : "MessageHeader.destination.receiver.extension:receiverLocalPart",
        "path" : "MessageHeader.destination.receiver.extension",
        "sliceName" : "receiverLocalPart",
        "min" : 0,
        "max" : "1",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "https://fhir.nhs.uk/StructureDefinition/Extension-MessageHeader-LocalPart"
            ]
          }
        ]
      },
      {
        "id" : "MessageHeader.destination.receiver.identifier",
        "path" : "MessageHeader.destination.receiver.identifier",
        "min" : 1
      },
      {
        "id" : "MessageHeader.destination.receiver.identifier.system",
        "path" : "MessageHeader.destination.receiver.identifier.system",
        "min" : 1
      },
      {
        "id" : "MessageHeader.destination.receiver.identifier.value",
        "path" : "MessageHeader.destination.receiver.identifier.value",
        "min" : 1
      },
      {
        "id" : "MessageHeader.sender",
        "path" : "MessageHeader.sender",
        "definition" : "The current requirement in NHS Digital API's is to rely on the [Access Tokens and Audit (JWT)](https://developer.nhs.uk/apis/spine-core/security_jwt.html) for sender details.\r\n\r\nFor use outside of NHS Digital it is recommended this is populated with either the Organisation ODS code or the Practitioner's professional code.\r\n\r\n```json\r\n\"sender\": {\r\n \"identifier\": {\r\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\r\n \"value\": \"VNE51\"\r\n }\r\n}\r\n```",
        "type" : [
          {
            "code" : "Reference",
            "targetProfile" : [
              "https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole",
              "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Practitioner",
              "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization"
            ]
          }
        ],
        "mustSupport" : true
      },
      {
        "id" : "MessageHeader.sender.extension",
        "path" : "MessageHeader.sender.extension",
        "slicing" : {
          "discriminator" : [
            {
              "type" : "value",
              "path" : "url"
            }
          ],
          "rules" : "open"
        },
        "min" : 0
      },
      {
        "id" : "MessageHeader.sender.extension:senderLocalPart",
        "path" : "MessageHeader.sender.extension",
        "sliceName" : "senderLocalPart",
        "min" : 0,
        "max" : "1",
        "type" : [
          {
            "code" : "Extension",
            "profile" : [
              "https://fhir.nhs.uk/StructureDefinition/Extension-MessageHeader-LocalPart"
            ]
          }
        ]
      },
      {
        "id" : "MessageHeader.sender.identifier",
        "path" : "MessageHeader.sender.identifier",
        "min" : 1,
        "mustSupport" : true
      },
      {
        "id" : "MessageHeader.sender.identifier.system",
        "path" : "MessageHeader.sender.identifier.system",
        "min" : 1
      },
      {
        "id" : "MessageHeader.sender.identifier.value",
        "path" : "MessageHeader.sender.identifier.value",
        "min" : 1
      },
      {
        "id" : "MessageHeader.enterer",
        "path" : "MessageHeader.enterer",
        "type" : [
          {
            "code" : "Reference",
            "targetProfile" : [
              "https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole",
              "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Practitioner"
            ]
          }
        ]
      },
      {
        "id" : "MessageHeader.author",
        "path" : "MessageHeader.author",
        "definition" : "If present, this **SHOULD** be an identifier reference to a `Practitioner` or `PractitionerRole`. Internal references to resources should **NOT** be used. \r\n\r\n```json\r\n\"author\": {\r\n \"type\": \"PractitionerRole\",\r\n \"identifier\": {\r\n \"system\": \"https://fhir.nhs.uk/Id/sds-role-profile-id\",\r\n \"value\": \"100102238986\"\r\n },\r\n \"display\": \"DR ALI\"\r\n},\r\n```",
        "type" : [
          {
            "code" : "Reference",
            "targetProfile" : [
              "https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole",
              "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Practitioner"
            ]
          }
        ]
      },
      {
        "id" : "MessageHeader.author.identifier",
        "path" : "MessageHeader.author.identifier",
        "min" : 1
      },
      {
        "id" : "MessageHeader.author.identifier.system",
        "path" : "MessageHeader.author.identifier.system",
        "min" : 1
      },
      {
        "id" : "MessageHeader.author.identifier.value",
        "path" : "MessageHeader.author.identifier.value",
        "min" : 1
      },
      {
        "id" : "MessageHeader.source",
        "path" : "MessageHeader.source",
        "definition" : "`source.endpoint` is required and **MUST** indicate the address where replies are to be sent.\r\n\r\nFor responses to be received via http this will be the address of the `$process-message` endpoint. E.g.\r\n\r\n```\r\nhttps://fhir.hospitaltrust.nhs.uk/$process-message\r\n```\r\n\r\nFor MESH this will follow [ITK2.2 MESH Transport Requirements](https://data.developer.nhs.uk/architecture/itk/Docs/ITK%20MESH%20Transport%20%20Requirements.pdf) for ITK Routing. E.g. the MESH Endpoint for Organisation B80310 \r\n\r\n```\r\n \"source\": {\r\n \"endpoint\": \"urn:nhs-uk:addressing:mesh:Y90638OT001\"\r\n }\r\n```",
        "mustSupport" : true
      },
      {
        "id" : "MessageHeader.responsible",
        "path" : "MessageHeader.responsible",
        "type" : [
          {
            "code" : "Reference",
            "targetProfile" : [
              "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Practitioner",
              "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization"
            ]
          }
        ]
      },
      {
        "id" : "MessageHeader.responsible.identifier",
        "path" : "MessageHeader.responsible.identifier",
        "min" : 1
      },
      {
        "id" : "MessageHeader.responsible.identifier.system",
        "path" : "MessageHeader.responsible.identifier.system",
        "min" : 1
      },
      {
        "id" : "MessageHeader.responsible.identifier.value",
        "path" : "MessageHeader.responsible.identifier.value",
        "min" : 1
      },
      {
        "id" : "MessageHeader.reason",
        "path" : "MessageHeader.reason",
        "definition" : "`reason` can be used to subdivide `eventCoding`. In the example below, `cancel` is used to indicate the specific reason for the event `prescription-order-update`. \r\nThe physical cancellation would be the `status=cancelled` in the `MedicationRequest` reason, the reason is a hint.\r\n\r\n```json\r\n\"reason\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://fhir.nhs.uk/CodeSystem/message-reason-prescription\",\r\n \"code\": \"cancel\",\r\n \"display\": \"Cancel\"\r\n }\r\n ]\r\n}\r\n```",
        "binding" : {
          "extension" : [
            {
              "url" : "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString" : "EventReason"
            }
          ],
          "strength" : "required",
          "valueSet" : "https://fhir.nhs.uk/ValueSet/message-reason-code"
        }
      },
      {
        "id" : "MessageHeader.reason.coding.system",
        "path" : "MessageHeader.reason.coding.system",
        "min" : 1
      },
      {
        "id" : "MessageHeader.reason.coding.code",
        "path" : "MessageHeader.reason.coding.code",
        "min" : 1
      },
      {
        "id" : "MessageHeader.response",
        "path" : "MessageHeader.response",
        "definition" : "If the message is a response to a previous message, the `response.identifier` **MUST** match the previous request messages `Bundle.identifier` *Correlation-ID*.\r\n\r\n```json\r\n\"response\": {\r\n \"identifier\": \"ad945a29-85f8-439a-b590-6789719adc16\",\r\n \"code\": \"ok\"\r\n}\r\n```"
      },
      {
        "id" : "MessageHeader.focus",
        "path" : "MessageHeader.focus",
        "definition" : "The focus element of the MessageHeader specifies the content of the message. The MessageHeader is followed by other resources depending on the type of request. \r\nFor example, a request to book an appointment may contain the Patient to book the appointment for, the Practitioner to book the appointment with and the actual Appointment that is requested.\r\n\r\n\r\n<br>\r\n\r\nThe focus section **SHOULD** match the focus section of the corresponding `MessageDefinition` \r\n\r\n*MessageDefinition.focus extract*\r\n\r\n```json\r\n\"focus\": [\r\n {\r\n \"code\": \"MedicationRequest\",\r\n \"profile\": \"https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest\",\r\n \"min\": 1,\r\n \"max\": \"4\"\r\n },\r\n {\r\n \"code\": \"Patient\",\r\n \"profile\": \"https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient\",\r\n \"min\": 1,\r\n \"max\": \"1\"\r\n },\r\n {\r\n \"code\": \"CommunicationRequest\",\r\n \"profile\": \"https://fhir.nhs.uk/StructureDefinition/DM-CommunicationRequest\",\r\n \"min\": 0,\r\n \"max\": \"*\"\r\n }\r\n ]\r\n```\r\n\r\nCorresponding *MessageHeader.focus* (Note: type is not required and is included for illustration purposes)\r\n\r\n```json\r\n\"focus\": [\r\n {\r\n \"type\": \"Patient\",\r\n \"reference\": \"urn:uuid:78d3c2eb-009e-4ec8-a358-b042954aa9b2\"\r\n },\r\n {\r\n \"type\": \"MedicationRequest\",\r\n \"reference\": \"urn:uuid:a54219b8-f741-4c47-b662-e4f8dfa49ab6\"\r\n },\r\n {\r\n \"type\": \"CommunicationRequest\",\r\n \"reference\": \"urn:uuid:28828C55-8FA7-42D7-916F-FCF076E0C10E\"\r\n }\r\n]\r\n```",
        "min" : 1
      },
      {
        "id" : "MessageHeader.focus.reference",
        "path" : "MessageHeader.focus.reference",
        "min" : 1
      }
    ]
  },
  "text" : {
  }
}

XIG built as of ??metadata-date??. Found ??metadata-resources?? resources in ??metadata-packages?? packages.